package com.hys.controller;

import com.hys.pojo.entity.ResponseResult;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestController;

@ControllerAdvice
@RestController
public class ExceptionController {
    @ExceptionHandler(Exception.class)
    public ResponseResult exceptionHandel(Exception ex){
        ex.printStackTrace();
        return new ResponseResult(false,"服务器异常");
    }
}
